<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var  data=[
            {id:1,name:'jack'},
            {id:2,name:'rose'},
            {id:3,name:'lucy'},
            {id:4,name:'翠花'}
        ]

        var  newData=data.filter(function(item){
            console.log(item,3333);
            
            if(item.id==3 ||  item.id==4){
                return true
            }
        })

        console.log(newData,3333);
        
    </script>
</body>
</html>